]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
a11y: setting the proper role/label_actor for SearchResult.content
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 16 Mar 2012 16:17:23 +0000 (17:17 +0100)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 1 Jun 2012 14:10:07 +0000 (16:10 +0200)
role/label_actor should be used for the actor that will receive
the focus. In some cases it was also (wrongly) set on the
container, so using an AT like Orca, it exposed both.

https://bugzilla.gnome.org/show_bug.cgi?id=672242

js/ui/searchDisplay.js

index 0a322925748002185abfd5256b0e8a98ed648f4e..fb1ca73e0df522ddb44e4685618f53126f71076d 100644 (file)
@@ -5,6 +5,7 @@ const Lang = imports.lang;
 const Gtk = imports.gi.Gtk;
 const Meta = imports.gi.Meta;
 const St = imports.gi.St;
+const Atk = imports.gi.Atk;
 
 const DND = imports.ui.dnd;
 const IconGrid = imports.ui.iconGrid;
@@ -33,12 +34,13 @@ const SearchResult = new Lang.Class({
             content = new St.Bin({ style_class: 'search-result-content',
                                    reactive: true,
                                    can_focus: true,
-                                   track_hover: true });
+                                   track_hover: true,
+                                   accessible_role: Atk.Role.PUSH_BUTTON });
             let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
                                              { createIcon: this.metaInfo['createIcon'] });
             content.set_child(icon.actor);
             this._dragActorSource = icon.icon;
-            this.actor.label_actor = icon.label;
+            content.label_actor = icon.label;
         } else {
             if (content._delegate && content._delegate.getDragActorSource)
                 this._dragActorSource = content._delegate.getDragActorSource();